﻿@model PetaPoco.Page<ZhongheCms.Models.GswViewJobInfo>
@{
    Layout = "~/Views/Shared/_Layout.cshtml";

    var jobState = "";
    string mysel = "";
    string myfcss = "";
    string mylcss = "";
    string mycss = "";
    if (Model.CurrentPage == 1)
    {
        myfcss = "disabled";
    }
    var fp = Model.CurrentPage - 1;
    if (ViewBag.pageIndex == Model.TotalPages)
    {
        mylcss = "disabled";
    }
    var np = Model.CurrentPage + 1;
}
@section css{
    <link rel="stylesheet" href="/Assets/css/datepicker.css" />
}
<div class="row">
    <div class="col-xs-12 padding-0">
        <div class="widget-box">
            <div class=" widget-header widget-header-flat" style="padding-left: 0px">
                
                <div class="widget-toolbar">
                    <form name="thisform" method="post" class="form-search" action="/JobInfo/PayList/0?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid">
                        <label>
                            <input class="date-picker search-input" id="sdate" name="sdate" type="text" data-date-format="yyyy-mm-dd" value="@ViewBag.sdate" placeholder="开始日期" style="width: 120px"/>
																	<i class="fa fa-exchange"></i>
																<input class="date-picker search-input" id="edate" name="edate" type="text" data-date-format="yyyy-mm-dd" value="@ViewBag.edate" placeholder="结束日期" style="width: 120px"/>
                            <input type="text" name="jname" id="jname" placeholder="职位名称" value="@ViewBag.jname" class="search-input"  autocomplete="off">
                        </label>
                        
															
                        <label>
                            <button type="submit" class="btn btn-xs btn-toolbar pull-right">
                                &nbsp;&nbsp; <i class="fa fa-search"></i><span class="bigger-110">搜索</span> &nbsp;&nbsp;
                            </button>
                        </label>
                    </form>
                </div>

            </div>
            <div class="widget-body">
                <div class="widget-main padding-2">

                    <table class="table table-striped table-bordered table-hover">
                        <tr>
                           
                           <th>发布日期
                            </th>
                            <th>招聘单位</th>
                            <th>编号</th>
                           @* <th>类别</th>*@
                            <th>职位名称</th>
                            
                            <th>工资待遇</th>
                            <th>结算方式</th>
                            
                            <th>工作日期</th>
                            <th>职位数量</th>
                            @*<th>报名数量</th>*@
                            <th>录取数量</th>
                             <th>状态</th>
                            <th class="center">发布
                            </th>
                        </tr>
                        <tbody>
                            @foreach (var item in Model.Items)
                            {
                                
                                <tr>
                                    


                                    <td>
                                        @item.PubDate.ToShortDateString() 
                                    </td>
                                    <td>
                                        @item.CusShortName
                                    
                                    </td>
                                    <td>
                                        @item.JobNo
                                    </td>
                                     <td>
                                        @item.JobTitle
                                    </td>
                                   
                                    <td>
                                        @item.Salary
                                    </td>
                                    <td>
                                        @item.PayTypeName
                                    </td>
                                  
                                    <td>
                                        @item.WorkDate
                                        @if (!string.IsNullOrEmpty(item.WorkTime))
                                        {
                                            <br /><span>@item.WorkTime</span>
                                        }
                                    </td>
                                    <td>
                                        @item.JobNum
                                    </td>
                                    @*<td>
                                        @item.RegisterNum
                                    </td>*@
                                    <td>
                                        @item.AcceptedNum
                                    </td>
                                     <td>
                                        @if (item.PayNoticeFlag == 0)
                                        {
                                            <span>未发布</span>
                                        }
                                        else
                                        {

                                           <span>已发布</span>
                                        }
                                     </td>
                                    <td class="center">
                                    <a href="/JobInfo/PayNotice/@item.Id?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&sdate=@ViewBag.sdate&edate=@ViewBag.edate&jname=@ViewBag.jname&pageIndex=@Model.CurrentPage"><span class="btn btn-xs btn-info no-border">
                                                                                                                                                                                                      <i class="fa fa-check-square-o"></i></span></a>
                                       
                                    </td>
                                </tr>
                                       
                            }
                        </tbody>
                    </table>

                </div>
                @if (Model.TotalPages > 1)
                {
                    <div class="modal-footer no-margin-top">
                        <button class="btn btn-sm btn-danger pull-left" data-dismiss="modal">
                            共 @Model.TotalItems 条记录
                        </button>

                        <ul class="pagination pull-right no-margin">
                            <li class="prev @myfcss">
                                <a href="/JobInfo/PayList/0?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&sdate=@ViewBag.sdate&edate=@ViewBag.edate&jname=@ViewBag.jname&pageIndex=@fp">
                                    <i class="fa fa-angle-double-left"></i>
                                </a>
                            </li>
                            @for (int i = 1; i <= Model.TotalPages; i++)
                            {
                                mycss = "";
                                if (i == ViewBag.pageIndex)
                                {
                                    mycss = "active";
                                }
                                <li class="@mycss"><a href="/JobInfo/PayList/0?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&sdate=@ViewBag.sdate&edate=@ViewBag.edate&jname=@ViewBag.jname&pageIndex=@i">@i</a></li>


                            }



                            <li class="next @mylcss">
                                <a href="/JobInfo/PayList/0?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&sdate=@ViewBag.sdate&edate=@ViewBag.edate&jname=@ViewBag.jname&pageIndex=@np">
                                    <i class="fa fa-angle-double-right"></i>
                                </a>
                            </li>
                        </ul>
                    </div>
                }
            </div>
        </div>
    </div>
</div>
@section js
{
     
    <script src="/assets/js/date-time/bootstrap-datepicker.min.js"></script>
    <script src="/assets/js/date-time/bootstrap-datepicker.zh-CN.js" ></script>
    
    <script type="text/javascript">
        jQuery(function ($) {
            //$('.datepick').datepicker({ autoclose: true, format: "yyyy-mm-dd", language: "zh-CN" });
            $('.date-picker').datepicker({
                autoclose: true,
                todayHighlight: true,
                language: "zh-CN"
            });
           

        });
    </script>

}
